﻿<Dialogs:DialogWindow 
             x:Class="Mnk.TBox.Plugins.SqlRunner.Components.FormRequest"
             xmlns:loc="clr-namespace:Mnk.TBox.Plugins.SqlRunner.Code.Localization"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Dialogs="clr-namespace:Mnk.Library.WpfControls.Dialogs;assembly=Mnk.Library.WPFControls"
             xmlns:sh="clr-namespace:Mnk.Library.WpfSyntaxHighlighter;assembly=Mnk.Library.WPFSyntaxHighlighter"
             mc:Ignorable="d" 
             Width="500" Height="500" MinWidth="500" MinHeight="500"
             WindowStyle="ToolWindow" Title="{Binding Key}"
            >
    <DockPanel>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" DockPanel.Dock="Bottom">
            <Button Name="btnTest" Content="{loc:Tr Test}" Margin="10" Padding="5,0" Click="BtnTestClick" IsDefault="True"/>
            <Button Content="{loc:Tr Cancel}" Margin="10" Padding="5,0" Click="CancelClick" IsCancel="True"/>
        </StackPanel>
        <TabControl Name="Tabs">
            <TabItem Header="{loc:Tr Request}">
                <DockPanel>
                    <CheckBox Content="UseTransaction" IsChecked="{Binding UseTransaction}" Margin="5" DockPanel.Dock="Top" HorizontalAlignment="Left"/>
                    <sh:SyntaxHighlighter Text="{Binding Command}" Format="mssql"/>
                </DockPanel>
            </TabItem>
            <TabItem Header="{loc:Tr Response}">
                <sh:SyntaxHighlighter Name="Response" IsReadOnly="True" Format="mssql"/>
            </TabItem>
        </TabControl>
    </DockPanel>
</Dialogs:DialogWindow>
